%h2{:class=>"content_header"}
  =t(:user_invite_your_fiends_to_vote_and_comment_your_content)
.content_container
  %p
  
  %h1
    =t(:campaign_how_to_win_more_title)

  %p
    .action_required
      =link_to t(:campaign_invite_now_friends), new_invitation_url
  %p
    =image_tag("icon_friends.gif")
    =t(:campaign_invite_friends_win_points,:points=>@current_user.active_campaign.points_invite_friends)
  %p
    .action_required
      =link_to t(:campaign_add_new_video_now), new_user_video_url(@current_user)
  %p
    =image_tag("icon_add.gif")
    =t(:campaign_submit_content_win_points,:points=>@current_user.active_campaign.points_submit_content)

  %p
    =image_tag("icon_comment.gif")
    =t(:campaign_comment_content_win_points,:points=>@current_user.active_campaign.points_comment_content)
  %p
    .action_required
      =link_to t(:campaign_see_all_videos_now), videos_url
  %p
    =image_tag("icon_like.gif")
    =t(:campaign_vote_content_win_points,:points=>@current_user.active_campaign.points_vote_content)

%script{:type => "text/javascript", :charset => "utf-8"}    
  Facebook.showPermissionDialog("publish_stream", function() {publishMessage()}); 

  var user_message = "#{campaign_publish_wall_comment_vote_user_content_message}";
  
  var img_src = "#{image_path(@current_user.active_campaign.campaign_image.url(:medium))}";
  
  
  var name = "#{@current_user.active_campaign.name}";
  var href = "#{user_videos_url(@current_user)}";
  
  var caption = "#{campaign_publish_wall_comment_vote_user_content_caption}";
  
  var description = "#{@current_user.active_campaign.description}";
  var link_href = "#{user_videos_url(@current_user)}";
  
  var link_text = "#{campaign_publish_wall_comment_vote_user_content_link_text}";
  
  var action_links = [{'text':link_text, 'href':link_href}];
  
  
  var target_id = null;
  var user_message_prompt = "#{campaign_publish_wall_comment_vote_user_content_user_message_prompt}";
  var callback = null;
  
  var auto_publish = false;
  
  var actor_id = null;
  
  :plain
    
    function publishMessage() {
      var attachment = {'name': name,'href': href,'caption': caption,'description': description,
      'media': [{'type': 'image','src': img_src, 'href': href}]}; 
      Facebook.streamPublish(user_message, attachment, action_links, target_id, user_message_prompt,callback, auto_publish, actor_id);
    }
 